/**
 * Created by rongyao on 2017/10/31.
 */
var mongoose = require('mongoose');
var mongoosePaginate = require('mongoose-paginate');
var Schema = mongoose.Schema;
var ObjectId = Schema.ObjectId

var Schema = new mongoose.Schema({
	fieldname:String,
	originalname:String,
	encoding:String,
	mimetype:String,
	destination:String,
	filename:String,
	path:String,
	size:String,
	date:{type:Date,default:Date.now},
	cateId:ObjectId
});
Schema.plugin(mongoosePaginate);

module.exports = mongoose.model('Upload',Schema,'upload'); // Model.paginate()